const numPoints = 5000;

let vertices = [
    vec3(-1.0, -1.0, 0.0),
    vec3(0.0, 1.0, 0.0),
    vec3(1.0, -1.0, 0.0)
];

let u = mix(vertices[0], vertices[1], 0.5);
let v = mix(vertices[0], vertices[2], 0.5);
let p = mix(u, v, 0.5);

points = [p];

for (let i = 0; points.length < numPoints; ++i) {
    let j = Math.floor(Math.random() * 3);
    p = mix(points[i], vertices[j], 0.5);
    points.push(p);
}

console.log(points);
debugger;
